package com.example.demo2;

public class DemoTest {

    public static void main(String[] args) {

        LightSwitch lightSwitch = new LightSwitch();
        lightSwitch.setLight("绿灯");

        lightSwitch.switchGreen();

        System.out.println("------------------------------------------");
        lightSwitch.switchRed();
        System.out.println("------------------------------------------");
        lightSwitch.switchYellow();
    }
}
